#include <QtPlugin>

#include <QVBoxLayout>
#include <QSpinBox>
#include <QWidget>
#include <QPushButton>
#include <QFileDialog>
#include <QScrollArea>
#include <QLabel>
#include <QString>
#include <QStringList>
#include <QGridLayout>
#include <QProgressBar>

#include <opencv/cv.h>
#include <opencv/highgui.h>

#include "QCVModuleInterface.h"
#include "QCVModuleHandlerInterface.h"

#ifndef MODULE_LOAD_COLLEC
#define MODULE_LOAD_COLLEC

class ModuleLoadCollec:public QObject,QCVModuleInterface
{
  Q_OBJECT
	Q_INTERFACES(QCVModuleInterface)
	
	public:
		void init(QCVModuleHandlerInterface * parent);
		void free();

		cv::Mat & process();
		void setInput(int n,const cv::Mat & m);

		QWidget* widget();
		QString getName();
		int nbInputs();
		QString help(int id);
		bool setParams(QString params);
    QString getParams();

		QCVModuleInterface * clone();

	public slots:
		void s_load();
		void s_send();	
	
	private:  
    QWidget * win;
    QVBoxLayout * layout;
		
		QPushButton * pb_load;
		QPushButton * pb_send;

		QList<cv::Mat> images;

		QScrollArea * scroll;
		QWidget * collection;
		QGridLayout * layout_collection;
		QProgressBar * pb;

		QCVModuleHandlerInterface * parent;
};

#endif
